@extends('admin')
@section('content')
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/user/customer')}}" method="get" class="search_form">
            <label for="search_title">用户名称：</label>
            <input type="text" name="name" value="{{isset($appends['name']) ? $appends['name'] : ""}}" id="search_title"
                   class="input length_2 mr10"/>
            <label for="search_title">用户状态：</label>
            <select name="status">
                <option value="null" {{6 === $appends['status'] ? " selected='selected'" : ''}}>不限</option>
                @foreach($status as $key=>$statu)
                    <option value="{{$key}}" {{$key == $appends['status'] ? " selected='selected'" : ''}}>{{$statu}}</option>
                @endforeach
            </select>
            <button type="submit" class="btn">查找用户</button>
        </form>
    </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户昵称</th>
                    <th>用户真实姓名</th>
                    <th>联系电话</th>
                    <th>用户状态</th>
                    <th>发布时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $item)
                    <tr>
                        <td>{{$item->userid}}</td>
                        <td>{{$item->nickname }}</td>
                        <td>{{$item->realname }}</td>
                        <td>{{$item->mobile}}</td>
                        <td>{{"" == $item->status ? "审核中" : $status[$item->status]}}</td>
                        <td>{{$item->createdate}}</td>
                        <td>
                            <a href="{{url('admin/user/checkc/'.$item->userid)}}" title="审核 {{$item->name}}"
                               class="mr10 J_dialog">[审核]</a>
                            <a href="{{url('admin/user/detailc/'.$item->userid)}}" title="查看 {{$item->name}}"
                               class="mr10 J_dialog">[查看]</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$list->total()}} 条数据
        </div>
        @if ($list->hasPages())
            <div class="pager">
                {!! $list->appends($appends)->render() !!}
            </div>
        @endif
    </div>
@stop